Remove version(unittest) imports to avoid extra imports in user code.#6450
Remove version(unittest) imports to avoid extra imports in user code.#6450dlang-bot merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @schveiguy! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + phobos#6450" |
| assert(r[0 .. lo].all!(x => !lt(p, x))); | ||
| assert(r[hi + 1 .. r.length].all!(x => !lt(x, p))); | ||
| // this used to import std.algorithm.all, but we want to save | ||
| // imports when unittests are enabled if possible. |
There was a problem hiding this comment.
I added the comment here to prevent regression.
There was a problem hiding this comment.
Shouldn't this be version (StdUnittest) anyway?
There was a problem hiding this comment.
StdUnittest was reverted because apparently -deps includes all unittests and thus usage of StdUnittest caused breakage for projects using -deps
|
ping @marler8997 here's the first one. |
|
4cfe9bc to
f2e5222
Compare
|
@JackStouffer fixed Edit: also fixed missing style space (grrr....) |
f2e5222 to
adaba54
Compare
|
FYI @marler8997 I have a few more modules to do, they are the tougher/more controversial ones. Will get to them next week. |
Having imports in
version(unittest)blocks means that user code being unit tested will also import these files incurring a compile-time penalty.Should help with dlang/dmd#8124 a bit, at least for the
version(unittest)portion.I will submit more PRs for the rest of Phobos, I wanted to make these PRs small and reviewable.